package ccc.virus.activemq;

import org.springframework.stereotype.Component;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * @Author:Ccc
 * @Description:
 * @Date:
 */
@Component("queueReceicer2")
public class QueueReceicer2 implements MessageListener {
    @Override
    public void onMessage(Message message) {
        try {
            System.out.println("queueReceicer2收到" + ((TextMessage)message).getText());
        } catch (JMSException e) {
            e.printStackTrace();
        }
    }
}
